// 引入导出的axios
import request from "../utils/request";


//查询所有的分类信息 get请求
export function getlistCategories(params) {
    return request.get('/CommodityCategory', { params: params })
  }

//添加商品分类
export function addCommodityCategory(data) {
  return request.post(`/commodityCategory`, data);
}

// 修改商品分类 put请求
export function updateCommodityCategory(id, data) {
  console.log(id);
  console.log(data);
  return request.put(`/commodityCategory/${id}`,data)
}

//删除分类 delete请求
export function delCommodityCategory(id) {
  return request.delete(`/commodityCategory/${id}`)
}